package by.bsu.fpmi.bbtp.controllers;

import by.bsu.fpmi.bbtp.authentication.Role;
import by.bsu.fpmi.bbtp.authentication.AllowedRoles;
import by.bsu.fpmi.bbtp.entities.TransportCompany;
import by.bsu.fpmi.bbtp.entities.TransportCompanyHead;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import java.util.List;

@WebService
@SOAPBinding(style= SOAPBinding.Style.RPC)
@AllowedRoles(Role.TRANSPORT_MANAGER)
public interface TransportCompanyController {

    @WebMethod
    public void saveTransportCompany(@WebParam(name = "sessionId") String sessionId,
                                     @WebParam(name = "company") TransportCompany company);

    @WebMethod
    public TransportCompany getTransportCompany(@WebParam(name = "sessionId") String sessionId,
                                                @WebParam(name = "companyId") long companyId);

    @WebMethod
    public List<TransportCompanyHead> getTransportCompaniesList(@WebParam(name = "sessionId") String sessionId);

    @WebMethod
    public void deleteTransportCompany(@WebParam(name = "sessionId") String sessionId,
                                       @WebParam(name = "companyId") long companyId);
}
